<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class ModifyEventZones extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        if (Schema::hasColumn('event', 'province_name')) {
            return;
        }
        Schema::table('event', function (Blueprint $table) {
            $table->string('province_name')->after('province_id')->default('')->comment('省份名称');
            $table->string('city_name')->default('')->after('city_id')->comment('城市名称');
            $table->string('county_name')->default('')->after('county_id')->comment('区县名字');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
